//
//  DJShopListHeaderCollectionReusableView.m
//  Adorable_Things
//
//  Created by lanou on 16/1/12.
//  Copyright © 2016年 Banana Inc. All rights reserved.
//

#import "DJShopListHeaderCollectionReusableView.h"


@implementation DJShopListHeaderCollectionReusableView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        NSArray *iconArr = @[@"iconfont-iconkafei (1)",@"iconfont-paixu",@"iconfont-paixu",@"iconfont-iconkafei (1)"];
        NSArray *nameArr = @[@"热销",@"最新",@"价格",@"包邮"];
        
        for (int i = 0; i < 4; i++) {
             UIImageView *ImageV = [[UIImageView alloc]initWithFrame:CGRectMake(i * kWidth/ 4 + 10, 10, kWidth / 20, 15)];
            ImageV.image = [UIImage imageNamed:iconArr[i]];
            ImageV.tag = 440 + i;
            [self addSubview:ImageV];
            
            UIButton *button = [UIButton buttonWithType:(UIButtonTypeCustom)];
            button.frame = CGRectMake(ImageV.right, 5, kWidth / 4 - ImageV.width - 10, 25);
            [button setTitle:nameArr[i] forState:(UIControlStateNormal)];
            button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
            [button setTitleColor:[UIColor grayColor] forState:(UIControlStateNormal)];
            button.tag = 450 + i;
            [self addSubview:button];
            if (i == 0) {
                
                [button setTitleColor:[UIColor redColor] forState:(UIControlStateNormal)];
            }
        }
       
        
    }
    return self;
}

@end
